SC_setupTerrainCollision
SYNTAX
SC_setupTerrainCollision TerrainNum , GroupNum , FreeObject
-TerrainNum: the terrain you want to setup
-GroupNum: the group that you want this terrain to belong to (0 for no group)
-FreeObject: Specify an object that is not currently in use that can be used to temporarily store
data about the terrain's limbs. This object will become free again when this command
has finished executing.
Mesh 255 and memblock 255 must not be in use.
A Terrain requires special setup since it contains many polygons seperated into limbs. In general an object
with limbs can be setup normally using either setupObject or setupComplexObject. However if the total number
of polygons across all the limbs exceeds around 21000 polygons these commands will crash.
SetupTerrainCollision has been designed to extract the polygon data from each limb one at a time, and build
a collision tree based on all the data. The end result is the same as any other setup command, so other
collision commands (e.g. rayCast or updateObject) can be called as usual on a terrain.
RELATED INFO
Collision Commands Menu
Index